package com.zhentao.demo;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Test1 {
    @Scheduled(cron = "0/1 * * * *  ?")
    public void test1(){
        System.out.println("每秒钟执行一次");
    }

    @Scheduled(cron = "0/5 * * * * ?")
    public void tes2(){
        System.out.println("每5秒执行一次");
    }
}
